

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'bddeathapplication-form',
	'enableAjaxValidation'=>true,
)); ?>

	<p class="note"><?php  echo Yii::t('application', 'Fields with <span class="required">*</span> are required.');?></p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'idbdeathinformer'); ?>		
                <?php echo $form->textField($model,'idbdeathinformer',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Bddeathapplication_idbdeathinformer\').val()',), 'url'=>CController::createUrl('bddeathapplication/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idbdeathinformer') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idbdeathinformer'); ?>_msg">
                    <?php echo !isset($model->idbdeathinformer0->idbdeathinformer) || $model->isNewRecord ? "-" : $model->idbdeathinformer0->idbdeathinformer; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idbdeathinformer', 'index.php?r=bddeathapplication/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idbdeathinformer'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'applicationdate'); ?>		
                <?php echo $form->textField($model,'applicationdate'); ?>
		<?php echo $form->error($model,'applicationdate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'idccstatus'); ?>		
                <?php echo $form->textField($model,'idccstatus',array('size'=>10,'maxlength'=>10,'ajax'=>array('type'=>'POST', 'dataType'=>'json', 'data'=>array('cid'=>'js:$(\'#Bddeathapplication_idccstatus\').val()',), 'url'=>CController::createUrl('ccstatus/jsonmessage'), 'success'=>'function(data){$(\'#' . CHtml::activeId($model,'idccstatus') . '_msg\').text(data.message);}'))); ?>
                <span id="<?php echo CHtml::activeId($model,'idccstatus'); ?>_msg">
                    <?php echo !isset($model->idccstatus0->statusname) || $model->isNewRecord ? "-" : $model->idccstatus0->statusname; ?>
                </span>
                <?php
                    $imghtml = CHtml::image(Yii::app()->request->baseUrl . '/images/tooltip.png');
                    echo CHtml::link($imghtml, "", array(
                        'style' => 'cursor: pointer; text-decoration: underline;',
                        'onclick' => "{popupview('idccstatus', 'index.php?r=ccstatus/popupview'); }"));
                    ?>
		<?php echo $form->error($model,'idccstatus'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'applicantname'); ?>		
                <?php echo $form->textField($model,'applicantname',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'applicantname'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'applicantaddress'); ?>		
                <?php echo $form->textField($model,'applicantaddress',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'applicantaddress'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'age'); ?>		
                <?php echo $form->textField($model,'age',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'age'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'dateofdeath'); ?>		
                <?php echo $form->textField($model,'dateofdeath'); ?>
		<?php echo $form->error($model,'dateofdeath'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? Yii::t('application', 'Create') : Yii::t('application', 'Save')); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->

<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idbdbirthinformer',
    'options' => array(
        'title' => Yii::t('application', 'Bdbirthinformers'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidbdbirthinformer"></div>
<?php $this->endWidget(); ?>
<?php
$this->beginWidget('zii.widgets.jui.CJuiDialog', array(// the dialog
    'id' => 'dialog' . get_class($model) . '_idccstatus',
    'options' => array(
        'title' => Yii::t('application', 'Ccstatuses'),
        'autoOpen' => false,
        'modal' => true,
        'width' => 550,
        'height' => 470,
    ),
));
?>
<div class="divforidccstatus"></div>
<?php $this->endWidget(); ?>

<script type="text/javascript">
    function popupview(id, url)
    {
        jQuery.ajax({'url':url,'data':'isAjaxRequest=1&id=<?php echo get_class($model);?>_' + id,'type':'post','dataType':'json','success':function(data)
            {
                $('#dialog<?php echo get_class($model);?>_' + id +' div.divfor' + id).html(data.div);
            } ,'cache':false});
        $('#dialog<?php echo get_class($model);?>_' + id).dialog('open');
        return false;
    }
</script>
